<template>
  <div>
    <el-table
      ref="multipleTable"
      :data="tableData"
      style="width: 100%;font-size:12px"
      tooltip-effect="dark"
      border
      :height="$store.state.app.tableHeight"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="expand">
        <template slot-scope="props">
          <el-form label-position="left" inline class="demo-table-expand">
            <el-form-item label="产品代码">
              <span>{{ props.row.product_content.product_code_num }}</span>
            </el-form-item>
            <el-form-item label="产品名称">
              <span>{{ props.row.product_content.brand_product_name }}</span>
            </el-form-item>
            <el-form-item label="规格">
              <span>{{ props.row.product_content.gg }}</span>
            </el-form-item>
            <el-form-item label="批号">
              <span>{{ props.row.production_num }}</span>
            </el-form-item>
            <el-form-item label="生产日期">
              <span>{{ props.row.production_date }}</span>
            </el-form-item>
            <el-form-item label="单位">
              <span>{{ props.row.product_content.pany }}</span>
            </el-form-item>
          </el-form>
        </template>
      </el-table-column>
      <el-table-column
        type="selection"
        width="45"
      />
      <el-table-column
        label="类别"
        width="120"
      >
        <template slot-scope="scope">
          {{ scope.row.type === "1" ? "已入库产品发货": scope.row.type === "2" ? "不入库直接发货" : "" }}
        </template>
      </el-table-column>
      <el-table-column
        label="出库单号"
        prop="order_num"
        width="140"
      />
      <el-table-column
        label="出库时间"
        prop="date"
        width="100"
      />
      <el-table-column
        label="客户类别/客户编号"
        width="80"
      >
        <template slot-scope="scope">
          {{ scope.row.anent_content.code_num }}
        </template>
      </el-table-column>
      <el-table-column
        label="客户名称"
        width="80"
      >
        <template slot-scope="scope">
          {{ scope.row.anent_content.anent_name.anent_name }}
        </template>
      </el-table-column>
      <el-table-column
        label="总数量"
        prop="count_all_num"
        width="60"
      />
      <el-table-column
        label="大条码"
        prop="big_bar_code_num"
        width="60"
      />
      <el-table-column
        label="中条码"
        prop="in_bar_code_num"
        width="60"
      />
      <el-table-column
        label="小条码"
        prop="small_bar_code_num"
        width="60"
      />
      <el-table-column
        label="上传账号"
        width="80"
      >
        <template slot-scope="scope">
          {{ scope.row.bar_code_user_content.name }}
        </template>
      </el-table-column>
      <el-table-column
        label="录入时间"
        prop="date"
      />
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    tableData: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {

    }
  },
  methods: {
    handleSelectionChange(val) {
      this.$emit('selectedVal', val)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
